  
	function GetRss(fid,div,num,stype,sid,dsLink){
  	//stype:0不循环 1循环
	   var url = dsLink;	  

		postMsg("正在读取数据，请稍等!","loading",div)		
		dojo.io.bind({
				url:url,
				handle: function(type, data, evt){ 
    			    if(type == "load"){    			    	
            			processXML(data,stype,sid,"1")
		        	 }else if(type == "error"){ 
						postMsg(data,"error")
			         }else{ 
						postMsg(data,"error")        	
			   	     }
	    		 },
				//mimetype:"text/xml",
				mimetype:"text/html",
				preventCache: false,
				useCache: false
			})						
	
		function processXML(data,stype,sid,dype){	
			   
		   var xmldoc = data;		
		   //alert(data);   		   
		   var title;
		   var links;
		   var content;
		   var img;
		   var description;
	 	   var rss="";
		   var oBuffer = new StringBuffer();
			oBuffer.append("<div id='right'><UL>");				
			oBuffer.append(data);			
			//var rssnum=items.length
			var totalnum=0
      //	for(i=0;(totalnum<num && i<rssnum);i++){       		
      		//var descid=fid+"_"+i     		
      						
						////title=items[i].getElementsByTagName("name");
						////links=items[i].getElementsByTagName("link");	
						//content = items[i].getElementsByTagName("Content");
						////oBuffer.append("<div><a href='"+links[0].firstChild.nodeValue+"' target='_blank' title='"+title[0].firstChild.nodeValue+"'>"+title[0].firstChild.nodeValue+"</a></div>")																									
						//oBuffer.append(content[0].firstChild.nodeValue);
						////alert(content[0].firstChild.nodeValue);
						//totalnum+=1;
						
		//	}
			oBuffer.append("</UL></div>")			
		    $(div).innerHTML=oBuffer.toString();	
			if(stype=="1"){
				sid=sid+1
				if(rssArray.length>sid){GetRss(rssArray[sid][0],"rss"+rssArray[sid][0],8,stype,sid,dtype)}
			}			
		 }		 
	}
	
	

		
		
		

//*******************************************
//   公共函数
//*******************************************	
	function StringBuffer(){
		this._strings_= new Array;	
	}
	
	StringBuffer.prototype.append = function(str){
		this._strings_.push(str);
	}
	StringBuffer.prototype.toString = function() {
			return this._strings_.join("");
	}

	function $(obj){return document.getElementById(obj)}	
	function show(i)
		{if($("desc"+i).style.display=="none"){$("desc"+i).style.display=""}
		else{$("desc"+i).style.display="none"}}

	function hideobj(id)//关闭窗口	
		{
			var url = "/res/app?page=UpdateDragSource&service=external&sp=Sclose&sp=S" + id;
			//alert(url);
			if($(id)){$(id).style.display='none';
			updateDragSource(url);
			
			}else{alert(id)}}

	function minmax(id){
	    var c=$("rss"+id);
    	if(c){
	        var d=c.style.display!="none";
    	    //c.style.display=d?"none":"block";
        	var e=$("minmax_a_"+id);
	        if(e){
	            if(d){e.className=e.className.replace(/minbox/,"maxbox")
				//wipeOut(c)
				dojo.lfx.html.wipeOut(c.id, 100).play();
				}
            else{e.className=e.className.replace(/maxbox/,"minbox")
			//wipeIn(c)
				dojo.lfx.html.wipeIn(c.id, 100).play();
			}
    	    }

	    }
	    return false
	}

	function editobj(id,id2)	
		{if($(id).style.display=="none"){$(id).style.display="";$(id2).innerHTML="取消"}
		else{$(id).style.display="none";$(id2).innerHTML="编辑"}}

	function setlistnum(rssid,rsstype,stype,dtype){
		var listnum=$("listnum_"+rssid).value		
		GetRss(rssid,"rss"+rssid,listnum,stype,0,dtype)
		}

	function postMsg(){
		if(arguments.length==3){var mdiv=arguments[2];}else{return}
		var msg=arguments[0];
		var imgtype=arguments[1]
		var imgtype=imgtype.toLowerCase();
		var img="";		
		switch(imgtype){
			case "loading":
				img="images/rss/loading.gif";
				break;
			case "ok":
				img="";
				break;			
			case "error":
				img="";
				break;		
			default:
				img=""
				break;	
		}
		$(mdiv).innerHTML="<div id='loading'>"+(img!=""?"<img src='"+img+"' border='0' width='20' height='20'> ":"")+msg+"</div>";	
		if(msg!="")	{
		$(mdiv).style.display=""}
		else{$(mdiv).style.display="none"}						
	}	
	
	//读取cookie
	function getCookieVal (offset){
		var endstr = document.cookie.indexOf (";", offset);
		if (endstr == -1)
		endstr = document.cookie.length;
		return unescape(document.cookie.substring(offset, endstr));
		}
		function getCookie (name)
		{
		var arg = name + "=";
		var alen = arg.length;
		var clen = document.cookie.length;
		var i = 0;
		while (i < clen)
		{
		var j = i + alen;
		if (document.cookie.substring(i, j) == arg)
		return getCookieVal (j);
		i = document.cookie.indexOf(" ", i) + 1;
		if (i == 0)
		break;
		}
		return null;
	}
	
	//更新拖动源位置
	function updateDragSource(url){	
		//alert(url);
		dojo.io.bind({
				url:url,
				handle: function(type, data, evt){ 
    			    if(type == "load"){
            			//alert("load success!");
		        	 }else if(type == "error"){ 
						postMsg(data,"error")
			         }else{ 
						postMsg(data,"error")        	
			   	     }
	    		 },
				mimetype:"text/html",
				preventCache: false,
				useCache: false
			})	
			
		}